package com.zk.dao;

import com.zk.domain.OtherStudent;
import com.zk.domain.Student;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author ZK
 * @Description
 * @time 2021/5/10 19:05
 * @note
 */
public interface StudentDao {

    List<Student> getAllStudents();

    int addStudent(Student student);

    /**
     * 传入一个简单的参数
     * @param id
     * @return com.zk.domain.Student
     */
    Student getStudentById(Integer id);

    /**
     * 传入多个参数
     * @param
     * @return java.util.List<com.zk.domain.Student>
     */
    List<Student> getStudentsByNameOrAge(@Param("myname") String name,
                                            @Param("myage") Integer age);

    List<OtherStudent> selectOtherStudents();

    OtherStudent selectDiffColStudent(Integer id);

    List<Student> selectNameLike1(String name);

    List<Student> selectNameLike2(String name);
}
